<?php 
//@file phpinput_xmlrpc.php 
$http_entity_body = "<xml><ToUserName>ToUserName</ToUserName><FromUserName>FromUser</FromUserName><CreateTime>123456789</CreateTime><MsgType>TEXT</MsgType><Event>CLICK</Event><EventKey>EVENTKEY</EventKey></xml>"; 
$http_entity_type = 'text/html'; 
$http_entity_length = strlen($http_entity_body); 
$host = 'static.softweare.net'; 
$port = 80; 
$path = '/wx/index.php/Api/main'; 
$fp = fsockopen($host, $port, $error_no, $error_desc, 30); 
if ($fp) {
fputs($fp, "POST {$path} HTTP/1.1\r\n"); 
fputs($fp, "Host: {$host}\r\n"); 
fputs($fp, "Content-Type: {$http_entity_type}\r\n"); 
fputs($fp, "Content-Length: {$http_entity_length}\r\n"); 
fputs($fp, "Connection: close\r\n\r\n"); 
fputs($fp, $http_entity_body . "\r\n\r\n"); 

$d="";
while (!feof($fp)) { 
$d.= fgets($fp, 4096); 
}
fclose($fp);
header("Content-Type:text/html;charset=UTF-8");
echo $d; 

} 
?> 